package cn.com.ege.mvc.service.impl.business;

import java.io.Serializable;

import cn.com.ege.mvc.exception.BusinessException;
import cn.com.ege.mvc.model.business.BomMaterial;
import cn.com.ege.mvc.model.business.Rule;
import cn.com.ege.mvc.service.BaseService;

public class RuleService extends BaseService<Rule> implements Serializable{
	public void save(Rule rule) throws BusinessException{
		if (null != rule ) {
			if(null != rule.getId()&& 0 != rule.getId()){
				update(rule);
			}else{
				add(rule);
			}
		}else {
			throw new BusinessException("Rule为空对象。");
		}
	}
}
